﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text.Json.Serialization;
using System.Threading.Tasks;
using FreeSql.DataAnnotations;
using Newtonsoft.Json;

namespace Bzzb.Model
{
    [Table(Name = "baozhangshebeiiot")]
    public class BaoZhangSheBeiIOT
    {
        [Column(IsIdentity = true, IsPrimary = true, Name = "id")]
        [JsonProperty("id")]
        public long Id { get; set; }

        [Column(Name = "jtid")]
        [JsonProperty("jtid")]
        [Description("保障设备ID")]
        public long Jtid { get; set; }

        #region 需要从传感器传过来的字段

        [Column(Name = "zxwz")]
        [JsonProperty("zxwz")]
        [Description("最新位置")]
        public string Zxwz { get; set; }

        [Column(Name = "mqzt")]
        [JsonProperty("mqzt")]
        [Description("目前状态")]
        public string Mqzt { get; set; }

        #endregion

        [Column(Name = "created", ServerTime = DateTimeKind.Local, CanUpdate = false, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("created")]
        public DateTime Created { get; set; }

        [Column(Name= "updated", ServerTime = DateTimeKind.Local, DbType = "datetime(0) NOT NULL")]
        [JsonProperty("updated")]
        public DateTime Updated { get; set; }
    }
}
